<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>

<body>
    <!--冒泡事件-->
    <div id="app">
        <input type="button" value="click" @contextmenu="click()" />
        <input type="button" value="preventDefault" @contextmenu="click2()" />
    </div>

    <script>
        new Vue({
            el: "#app",
            methods: {
                click:function(){
                    //event.preventDefault();
                    alert("value");
                },
                click2:function(){
                    alert("preventDefault");
                }
            }
        });
    </script>
</body>

</html>